package com.smartleanx.module.hrm.service.esign.service.impl;


import cn.hutool.core.bean.BeanUtil;
import cn.hutool.json.JSONObject;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.smartleanx.framework.datapermission.core.annotation.DataPermission;
import com.smartleanx.framework.tenant.core.aop.TenantIgnore;
import com.smartleanx.module.hrm.dal.mysql.esign.HrmETempComponentsMapper;
import com.smartleanx.module.hrm.service.esign.service.HrmETempComponentsService;
import com.smartleanx.module.hrm.service.esign.temp.po.HrmETempComponents;
import com.smartleanx.module.hrm.service.esign.temp.result.ComponentResult;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.stream.Collectors;

/**
 * e签宝模板中的控件Service实现
 *
 * @author xzq
 * @since 2025-07-11 13:54:49
 */
@Service
public class HrmETempComponentsServiceImpl extends ServiceImpl<HrmETempComponentsMapper, HrmETempComponents> implements HrmETempComponentsService {


    @Override
    @TenantIgnore //不使用租户查询
    public List<HrmETempComponents> getFillInComponents(String tempESignId) {
        LambdaQueryWrapper<HrmETempComponents> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(HrmETempComponents::getDataStatus,1);
        queryWrapper.eq(HrmETempComponents::getESignTempId,tempESignId);
        List<HrmETempComponents> list = list(queryWrapper);

        return list;
    }
}
